package com.hao.tool.common.constant;

import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;

/**
 * description
 *
 * @author: lanyh
 * @date: 2019/4/23 08:45
 */
public interface Constants {

    /**
     * 默认的日期格式
     */
    String DATETIME_PATTERN = "yyyyMMddHHmmssSSS";
    String DATETIME_PATTERN_ymd_hms = "yyyy-MM-dd HH:mm:ss";
    String DATETIME_PATTERN_T = "yyyy-MM-dd'T'HH:mm:ss";
    /**
     * 北京/上海时区
     */
    ZoneId CHINA_ZONEID = ZoneId.systemDefault();

    ZoneOffset CHINA_ZONE_OFFSET = OffsetDateTime.now().getOffset();

    /**
     * 默认编码
     */
    String DEFAULT_CHARSET = "UTF-8";

    String RESULT_DATA_KEY = "data";

    String RESULT_CODE_KEY = "resultCode";

    String RESULT_MSG_KEY = "message";

    String SUCCESS = "SUCCESS";

    String FAIL = "FAIL";

    DateTimeFormatter DEFAULT_DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");

    DateTimeFormatter DATE_FORMATTER_YYYYMMDD = DateTimeFormatter.ofPattern("yyyyMMdd");

    DateTimeFormatter DEFAULT_DATETIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

    DateTimeFormatter DEFAULT_MONTH_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM");
}
